package com.ruoyi.monitor.domain;

import java.util.Date;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 均值对象 avg_pollutant
 * 
 * @author xzx
 * @date 2023-01-12
 */
@Accessors(chain = true)
@TableName("avg_pollutant")
public class PollutantAvg implements Comparable<PollutantAvg>
{
    private static final long serialVersionUID = 1L;
    @Excel(name = "编号",cellType = Excel.ColumnType.NUMERIC,prompt = "编号")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Excel(name = "空气污染指数(AQI)",cellType = Excel.ColumnType.NUMERIC)
    private Float aqi;

    @Excel(name = "PM10",cellType = Excel.ColumnType.NUMERIC)
    private Float pm10;

    @Excel(name = "PM25",cellType = Excel.ColumnType.NUMERIC)
    private Float pm25;

    @Excel(name = "二氧化硫",cellType = Excel.ColumnType.NUMERIC)
    private Float so2;

    @Excel(name = "二氧化氮",cellType = Excel.ColumnType.NUMERIC)
    private Float no2;

    @Excel(name = "一氧化碳",cellType = Excel.ColumnType.NUMERIC)
    private Float co;

    @Excel(name = "O3",cellType = Excel.ColumnType.NUMERIC)
    private Float o3;

    /** $column.columnComment */
    /**
     * 数据类型，1，日均值，2.周均值，3.月均值
     */
    @Excel(name = "类型", cellType =  Excel.ColumnType.STRING)
    private Integer type;

    /** $column.columnComment */
    @Excel(name = "城市",cellType =  Excel.ColumnType.STRING)
    private String area;

    /** $column.columnComment */
    @Excel(name = "时间",dateFormat = "yyyy-MM-dd",readConverterExp = "$column.readConverterExp()")
    private Date ct;
    //开始日期
    @Excel(name = "开始时间",dateFormat = "yyyy-MM-dd HH:mm:ss",readConverterExp = "$column.readConverterExp()")
    private Date start;
    //结束日期
    @Excel(name = "结束时间",dateFormat = "yyyy-MM-dd HH:mm:ss",readConverterExp = "$column.readConverterExp()")
    private Date end;

    @TableField(exist = false)
    private String searchValue;

    @TableField(exist = false)
    private String createBy;

    @TableField(exist = false)
    private Date createTime;

    @TableField(exist = false)
    private String updateBy;

    @TableField(exist = false)
    private Date updateTime;

    @TableField(exist = false)
    private String remark;

    @TableField(exist = false)
    private String params;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Float getAqi() {
        return aqi;
    }

    public void setAqi(Float aqi) {
        this.aqi = aqi;
    }

    public Float getPm10() {
        return pm10;
    }

    public void setPm10(Float pm10) {
        this.pm10 = pm10;
    }

    public Float getPm25() {
        return pm25;
    }

    public void setPm25(Float pm25) {
        this.pm25 = pm25;
    }

    public Float getSo2() {
        return so2;
    }

    public void setSo2(Float so2) {
        this.so2 = so2;
    }

    public Float getNo2() {
        return no2;
    }

    public void setNo2(Float no2) {
        this.no2 = no2;
    }

    public Float getCo() {
        return co;
    }

    public void setCo(Float co) {
        this.co = co;
    }

    public Float getO3() {
        return o3;
    }

    public void setO3(Float o3) {
        this.o3 = o3;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public Date getCt() {
        return ct;
    }

    public void setCt(Date ct) {
        this.ct = ct;
    }

    public String getSearchValue() {
        return searchValue;
    }

    public void setSearchValue(String searchValue) {
        this.searchValue = searchValue;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public Date getStart() {
        return start;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    @Override
    public String toString() {
        return "PollutantAvg{" +
                "id=" + id +
                ", aqi=" + aqi +
                ", pm10=" + pm10 +
                ", pm25=" + pm25 +
                ", so2=" + so2 +
                ", no2=" + no2 +
                ", co=" + co +
                ", o3=" + o3 +
                ", type=" + type +
                ", area='" + area + '\'' +
                ", ct=" + ct +
                ", start=" + start +
                ", end=" + end +
                ", searchValue='" + searchValue + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime=" + createTime +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                ", params='" + params + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PollutantAvg that = (PollutantAvg) o;
        return Objects.equals(aqi, that.aqi) &&
                Objects.equals(pm10, that.pm10) &&
                Objects.equals(pm25, that.pm25) &&
                Objects.equals(so2, that.so2) &&
                Objects.equals(no2, that.no2) &&
                Objects.equals(co, that.co) &&
                Objects.equals(o3, that.o3) &&
                Objects.equals(type, that.type) &&
                Objects.equals(area, that.area) &&
                Objects.equals(ct, that.ct) &&
                Objects.equals(start, that.start) &&
                Objects.equals(end, that.end);
    }

    @Override
    public int hashCode() {
        return Objects.hash(aqi, pm10, pm25, so2, no2, co, o3, type, area, ct, start, end);
    }

    @Override
    public int compareTo(PollutantAvg o) {
        return this.ct.compareTo(o.ct);
    }
}
